-- GENERATED SPELL FOR [Ashtongue Feral Spirit] --


function spell0_22849(pUnit, Event) --@Charge Rage,Self--
pUnit:FullCastSpellOnTarget(39575,pUnit)
pUnit:RegisterEvent('Sorts_22849', 20000, 1)
end

function spell1_22849(pUnit, Event) --@Spirit Bond,Self--
pUnit:FullCastSpellOnTarget(39578,pUnit)
pUnit:RegisterEvent('Sorts_22849', 20000, 1)
end

function Sorts_22849(pUnit, Event)
local choix_sorts_22849 = math.random(0, 1)
if choix_sorts_22849 == 0 then
pUnit:RegisterEvent('spell0_22849', 1, 1)
end
if choix_sorts_22849 == 1 then
pUnit:RegisterEvent('spell1_22849', 1, 1)
end
end

function mob22849_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22849', math.random(1500, 3000), 1)
end

function mob22849_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22849_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22849_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22849, 1, 'mob22849_Action')
RegisterUnitEvent(22849, 2, 'mob22849_Leave')
RegisterUnitEvent(22849, 3, 'mob22849_Kill')
RegisterUnitEvent(22849, 4, 'mob22849_Die')
